<?php defined('IN_YuLin') || exit('NO PERMIT!'); ?>
{template index/header}

<div class="x-nav" style="height: 45px;">
	<span class="layui-breadcrumb">
		<a>首页</a>
		<a>彩票管理</a>
		<a>玩法管理</a>
	</span>
	<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
		<i class="layui-icon" style="line-height:30px">ဂ</i>
	</a>
	<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin:3px 5px 0 0;float:right" href="{U('lottery/play', array('operation'=>'playfollow_list'))}">
		<i class="layui-icon" style="line-height:30px;">管理从玩法</i>
	</a>
	<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin:3px 5px 0 0;float:right" href="{U('lottery/play', array('operation'=>'playtype_list'))}">
		<i class="layui-icon" style="line-height:30px;">管理玩法类别</i>
	</a>
	<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin:3px 5px 0 0;float:right" href="{U('lottery/play', array('operation'=>'playmain_list'))}">
		<i class="layui-icon" style="line-height:30px;">管理主玩法</i>
	</a>
</div>

<div class="x-body">
	<form class="layui-form ajaxform" action="?" method="post">
		<input type="hidden" name="m" value="{$m}" />
		<input type="hidden" name="c" value="{$c}" />
		<input type="hidden" name="a" value="update" />
		<table class="layui-table">
			<thead>
				<tr>
					<th width="25%">彩种类别</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody id="datalist">
				{loop $cateIdKey as $ck => $cv}
				<tr>
					<td class="text-c">{$cv['name']}</td>
					<td class="txt-left">
						<a href="{U('lottery/play', array('operation'=>'playmain_list', 'cate_id'=> $cv['id']))}">主玩法管理</a>
					</td>
				</tr>
				{/loop}
			</tbody>
		</table>
	</form>
</div>

<script>
	function SonPlay(obj)
	{
		var play = $(obj).parent().parent();
		var cid = play.data('cid');
		var pid = play.data('id');
		
		$.get('{U($m."/".$c."/".$a)}',{'cid':cid,'pid':pid},function(res){
			$(obj).remove();
			var html = res.split("<tbody id=\"datalist\">");
				html = html[1].split('</tbody>');
			play.after(html[0]);
		});
	}
</script>

{template index/footer}